<!DOCTYPE HTML>
<html th:with="title='收款用户',module='/js/app/common/uploadaudio.js'">
<head th:include="fragments/header :: header">
</head>
<body id="app">
	<div class="page-container">
		<form action="/manager/transfers/trans" method="post" class="form form-horizontal" id="device-form">
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">
					<span class="c-red">*</span>
					收款用户的OPENID：
				</label>
				<div class="formControls col-xs-2 col-sm-2">
					<input type="text" class="input-text size-L" id="openid" name="openid">
				</div>
			</div>

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">
					<span class="c-red">*</span>
					转账金额：
				</label>
				<div class="formControls col-xs-2 col-sm-2">
					<input type="text" class="input-text size-L" id="amount" name="amount">
				</div>
			</div>

			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
					<input class="btn btn-primary size-L radius" type="submit" value="提交">
					<input class="btn btn-primary size-L radius" type="button" onclick="closeWin()" value="关闭">
				</div>
			</div>
		</form>
	</div>

	<div th:include="fragments/widget :: userTreePanel"></div>
	<script th:include="fragments/widget :: userTreeJs" type="text/javascript">
		
	</script>
	<script type="text/javascript">
		var app = new Vue({
			el : '#app',
			data : {
				citys : {},
			}
		});

		$(function() {
			$('#multuserIds').multiselect({
				submitAllLeft : false,
				submitAllRight : false
			});
			citys();
			$("#device-form").validate({
				rules : {
					name : {
						required : true,
						minlength : 2,
						maxlength : 16
					},
					remark : {
						required : false,
						minlength : 2,
						maxlength : 16
					}
				},
				onkeyup : false,
				focusCleanup : true,
				success : "valid",
				submitHandler : function(form) {
					var data = $('#device-form').serialize();

					if ($("#operator").val() != "") {
						data += "&user.id=" + $("#operator").val();
					}
					$.ajax({
						type : "POST",
						url : '/manager/transfers/trans',
						data : data,
						beforeSend : function() {

						},
						complete : function() {

						},
						error : function(request) {
							layer.alert("系统出错");
						},
						success : function(data) {
							if (data.status == 0) {
								refreshUParentList();
								layer.alert(data.message, function() {
									var index = parent.layer.getFrameIndex(window.name);
									parent.layer.close(index);
								});
							} else {
								layer.alert(data.message);
							}
						}
					});
				}
			});
		});
	</script>
</body>
</html>